package top.cwk.eureka.FeignConsumer.service;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 指定要调用服务
 *
 */
@FeignClient(value = "service-01",fallback = ErrorHelloServiceImpl.class)
public interface HelloService {

    /**
     * 定义该调用服务下的具体接口和参数,无需实现
     * @param name
     * @return
     */
    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    String getHello(@RequestParam("name") String name);
}
